Optimal. Leaf size=53 \[ \frac {(a c-b c x)^{n+2}}{b c^2 (n+2)}-\frac {2 a (a c-b c x)^{n+1}}{b c (n+1)} \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {43} \begin {gather*} \frac {(a c-b c x)^{n+2}}{b c^2 (n+2)}-\frac {2 a (a c-b c x)^{n+1}}{b c (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rubi steps
\begin {align*} \int (a+b x) (a c-b c x)^n \, dx &=\int \left (2 a (a c-b c x)^n-\frac {(a c-b c x)^{1+n}}{c}\right ) \, dx\\ &=-\frac {2 a (a c-b c x)^{1+n}}{b c (1+n)}+\frac {(a c-b c x)^{2+n}}{b c^2 (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 43, normalized size = 0.81 \begin {gather*} \frac {(b x-a) (a (n+3)+b (n+1) x) (c (a-b x))^n}{b (n+1) (n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.08, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x) (a c-b c x)^n \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.34, size = 58, normalized size = 1.09 \begin {gather*} -\frac {{\left (a^{2} n - 2 \, a b x - {\left (b^{2} n + b^{2}\right )} x^{2} + 3 \, a^{2}\right )} {\left (-b c x + a c\right )}^{n}}{b n^{2} + 3 \, b n + 2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.05, size = 103, normalized size = 1.94 \begin {gather*} \frac {{\left (-b c x + a c\right )}^{n} b^{2} n x^{2} + {\left (-b c x + a c\right )}^{n} b^{2} x^{2} - {\left (-b c x + a c\right )}^{n} a^{2} n + 2 \, {\left (-b c x + a c\right )}^{n} a b x - 3 \, {\left (-b c x + a c\right )}^{n} a^{2}}{b n^{2} + 3 \, b n + 2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 47, normalized size = 0.89 \begin {gather*} -\frac {\left (b n x +a n +b x +3 a \right ) \left (-b x +a \right ) \left (-b c x +a c \right )^{n}}{\left (n^{2}+3 n +2\right ) b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.40, size = 81, normalized size = 1.53 \begin {gather*} \frac {{\left (b^{2} c^{n} {\left (n + 1\right )} x^{2} - a b c^{n} n x - a^{2} c^{n}\right )} {\left (-b x + a\right )}^{n}}{{\left (n^{2} + 3 \, n + 2\right )} b} - \frac {{\left (-b c x + a c\right )}^{n + 1} a}{b c {\left (n + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.32, size = 66, normalized size = 1.25 \begin {gather*} {\left (a\,c-b\,c\,x\right )}^n\,\left (\frac {2\,a\,x}{n^2+3\,n+2}-\frac {a^2\,\left (n+3\right )}{b\,\left (n^2+3\,n+2\right )}+\frac {b\,x^2\,\left (n+1\right )}{n^2+3\,n+2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.70, size = 245, normalized size = 4.62 \begin {gather*} \begin {cases} a x \left (a c\right )^{n} & \text {for}\: b = 0 \\- \frac {a \log {\left (- \frac {a}{b} + x \right )}}{- a b c^{2} + b^{2} c^{2} x} - \frac {2 a}{- a b c^{2} + b^{2} c^{2} x} + \frac {b x \log {\left (- \frac {a}{b} + x \right )}}{- a b c^{2} + b^{2} c^{2} x} & \text {for}\: n = -2 \\- \frac {2 a \log {\left (- \frac {a}{b} + x \right )}}{b c} - \frac {x}{c} & \text {for}\: n = -1 \\- \frac {a^{2} n \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} - \frac {3 a^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac {2 a b x \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac {b^{2} n x^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} + \frac {b^{2} x^{2} \left (a c - b c x\right )^{n}}{b n^{2} + 3 b n + 2 b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________